import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import Login from '@/components/Login'
import Register from '@/components/Register'
import Course from '@/components/Course'
import Detail from '@/components/Detail'
import Cart from "@/components/Cart"
import Order from "@/components/Order"
import Success from "@/components/Success"
import Myorder from "@/components/Myorder"
import Player from "@/components/Player"
Vue.use(Router);

export default new Router({
  mode : 'history' ,
  routes: [
    {
      path: '/',
      name: '',
      component: Home,
    },
    {
      path: '/home',
      name: '',
      component: Home,
    },
    {
      path: '/user/login',
      name: '',
      component: Login,
    },
    {
      path: '/user/register',
      name: '',
      component: Register,
    },
    {
      path: '/course',
      name: '',
      component: Course,
    },
    {
      path: '/course/detail/:id/',  // this.$route.params.id
      name: '',
      component: Detail,
    },
    {
      path: '/cart',
      name: '',
      component: Cart,
    },
    {
      path: '/order',
      name: '',
      component: Order,
    },
    {
      path: '/payment/result/',
      name: '',
      component: Success,
    },
    {
      path: '/myorder',
      name: '',
      component: Myorder,
    },
    {
      path: '/polyv/player/:vid',   // this.$route.params.id
      name: '',
      component: Player,
    },

  ],

})
